/**
 * @author 甜圆
 * @version v1.0.1
 * @date 2025/8/31 13:21
 * @package PACKAGE_NAME
 * @copyright 甜圆
 */
// 1. 让这个类实现 Serializable 接口
public class Person implements java.io.Serializable {
    // 2. 声明一些属性
    private String name;
    private int age;

    // 3. 构造方法、getter和setter
    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }
    // ... 省略 getter 和 setter ...

    @Override
    public String toString() {
        return "Person{name='" + name + "', age=" + age + "}";
    }
}
